home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
TPUG - Toronto PET Users Group
/
TPUG Users Group CD
/
TPUG Users Group CD.iso
/
C64
/
T-TPUG Old Monthly Disks
/
(c)t8.d64
/
coil design.z
(
.txt
)
< prev
next >
Wrap
Commodore BASIC
|
2007-02-04
|
6KB
|
195 lines
100 CLR:PRINT"[147]"
110 REM"THIS IS A COIL DESIGN PROGRAM BY"
120 REM"HARRY L. ROSIER - K4LBF"
130 REM"FINAL DESIGN NOVEMBER 5, 1980."
140 REM"SPECIAL THANKS TO THE RADIO"
150 REM"AMATEUR'S HANDBOOK FOR THE"
160 REM"EQUATION AND WIRE TABLES"
170 PRINTTAB(12)"COIL DESIGN":PRINT:PRINT
180 PRINT"THIS PROGRAM IS SELF EXPLANATORY BUT "
190 PRINT"WOULD YOU LIKE A BRIEF DESCRIPTION?"
200 PRINT"PLEASE ANSWER (Y OR N)":INPUT D$
210 PRINT
220 IF D$="Y" THEN GOSUB1690
230 PRINT:PRINT
240 IF D$="N" THEN GOTO 280
250 PRINT" TO CONTINUE, PRESS ANY KEY":FORI=1TO8:PRINT:NEXTI
260 GET A$:IF A$=""GOTO260
270 FOR I = 1 TO 100: NEXT I
280 PRINTTAB(15)"NOTES":PRINT:PRINT
290 PRINT"1. DESIGN OF THE COIL MUST MEET"
300 PRINT" THE FOLLOWING CRITERIA:"
310 PRINT
320 PRINT" 75 MICROHENRIES MAX. INDUCTANCE"
330 PRINT" .2 MICROHENRIES MIN. INDUCTANCE"
340 PRINT" 8 GAGE MAX. WIRE SIZE"
350 PRINT" 40 GAGE MIN. WIRE SIZE"
360 PRINT" (FOR 1/4 INCH TUBING - USE SIZE 0)"
370 PRINT
380 PRINT"2. RESISTORS CAN BE USED AS COIL FORMS,"
390 PRINT" AND MUST BE COMPOSITION TYPE HAVING"
400 PRINT" THE FOLLOWING DIMENSIONS"
410 PRINT
420 PRINT" 1. 1/2 WATT - .14 X .38 INCHES"
430 PRINT" 2. 1 WATT - .22 X .58 INCHES"
440 PRINT" 3. 2 WATT - .30 X .70 INCHES"
450 PRINT" (THESE ARE STANDARD RESISTOR SIZES)"
460 PRINT"3. OR,SELECT YOUR OWN DIAMETER FORM"
470 PRINT:PRINT" TO CONTINUE PRESS ANY KEY"
480 GET A$: IF A$="" THEN480
490 FORI=1TO20:PRINT:NEXTI
500 PRINT"DO YOU WISH TO BEGIN WITH":PRINT
510 PRINT"1-INDUCTANCE IN MICROHENRIES, OR"
520 PRINT"2-INDUCTIVE REACTANCE"
530 PRINT
540 INPUT S:PRINT
550 IF S=1 THEN 660:IF S=2 THEN 570
560 IFS<1ORS>2THENPRINT"ANSWER 1 OR 2 PLEASE":GOTO540
570 PRINT"WHAT IS THE DESIRED INDUCTIVE REACTANCE IN OHMS":INPUTXL:PRINT
580 INPUT"WHAT FREQUENCY IN MEGAHERTZ";F:PRINT
590 L=XL/(2*3.14159*F)
600 L$=STR$(L)
610 PRINT"REQUIRED INDUCTANCE=";LEFT$(L$,5)
620 PRINT"MICROHENRIES"
630 IF L<.2 OR L>75 GOTO570
640 GOTO690
650 FOR X=1TO16:PRINT"":NEXT
660 PRINT"WHAT IS THE DESIRED COIL INDUCTANCE IN MICROHENRIES":INPUTL:PRINT
670 IF L>75 THEN PRINT"75 MICRO-H MAX. PLEASE REENTER":GOTO660
680 IF L<.2 THEN PRINT"0.2 MICROHENRIES MIN.- PLEASE REENTER":GOTO660
690 PRINT"SELECT COIL FORM"
700 PRINT" 1-1/2 W RESISTOR"
710 PRINT" 2-1 W RESISTOR"
720 PRINT" 3-2 W RESISTOR"
730 PRINT" 4- OTHER FORM"
740 PRINT
750 INPUT A
760 IF A<1ORA>4 THEN750
770 IF A =1 THEN D=.140
780 IF A =2 THEN D=.220
790 IF A =3 THEN D=.300
800 IF A =4 THEN820
810 IF A =<3 THEN850
820 PRINT"WHAT IS THE DIAMETER OF THE"
830 PRINT"COIL IN INCHES?"
840 PRINT : INPUT D
850 PRINT "WHAT GAGE ENAMELED WIRE IS TO BE USED ":INPUT G
860 IF G=0 THEN W=.250
870 IF G=8 THEN W=.131
880 IF G=9 THEN W=.116
890 IF G=10 THEN W=.104
900 IF G=11 THEN W=.093
910 IF G=12 THEN W=.083
920 IF G=13 THEN W=.074
930 IF G=14 THEN W=.067
940 IF G=15 THEN W=.060
950 IF G=16 THEN W=.053
960 IF G=17 THEN W=.047
970 IF G=18 THEN W=.042
980 IF G=19 THEN W=.038
990 IF G=20 THEN W=.034
1000 IF G=21 THEN W=.030
1010 IF G=22 THEN W=.027
1020 IF G=23 THEN W=.024
1030 IF G=24 THEN W=.0216
1040 IF G=25 THEN W=.0193
1050 IF G=26 THEN W=.0172
1060 IF G=27 THEN W=.0154
1070 IF G=28 THEN W=.0138
1080 IF G=29 THEN W=.0122
1090 IF G=30 THEN W=.011
1100 IF G=31 THEN W=.0099
1110 IF G=32 THEN W=.00885
1120 IF G=33 THEN W=.0079
1130 IF G=34 THEN W=.0070
1140 IF G=35 THEN W=.0063
1150 IF G=36 THEN W=.0057
1160 IF G=37 THEN W=.0050
1170 IF G=38 THEN W=.0045
1180 IF G=39 THEN W=.0040
1190 IF G=40 THEN W=.0035
1200 IF G>40 THEN850
1210 N=((40*L*W)+SQR ((1600*W^2*L^2) +(72*D^2*L)))/(2*D^2)
1220 N1=((40*L*W)-SQR ((1600*W^2*L^2) +(72*D^2*L)))/(2*D^2)
1230 IF N>N1 THEN N2=N
1240 IF N<=N1 THEN N2=N1
1250 N2=(INT(N2*10))/10
1260 FOR X=1 TO 15:PRINT:NEXT
1270 PRINT"WIRE SIZE=";G;" GAGE"
1280 PRINT"COIL DIA.=";D;" INCHES"
1290 PRINT"NUMBER OF TURNS=";N2
1300 PRINT"COIL LENGTH=";(INT(N2*W*100))/100;" INCHES":PRINT
1310 R=INT(N2*W*100/D)/100
1320 IF A =1 THEN1480
1330 IF A =2 THEN1500
1340 IF A =3 THEN1520
1350 PRINT"THE LENGTH TO DIA. RATIO IS"
1360 PRINT R
1370 IF A=4 THEN GOSUB1540
1380 FOR X=1 TO 10:PRINT:NEXT
1390 PRINT "SELECT ANOTHER FORM AND/OR DIFFERENT "
1400 PRINT"SIZE WIRE?":PRINT
1410 INPUT"(Y OR N)";C$
1420 IF C$="Y" THEN690:PRINT
1430 PRINT "DESIGN ANOTHER COIL?(Y OR N)":INPUTB$
1440 IF B$="Y" THEN500
1450 PRINT:PRINT
1460 PRINT"O.K. GOOD LUCK WITH YOUR PROJECT!!"
1470 END
1480 IF N2*W>.385 THEN PRINT"COIL TOO LONG FOR 1/2 W FORM":GOTO1390
1490 IF N2*W<=.385 GOTO1350
1500 IF N2*W>.525 THEN PRINT"COIL TOO LONG FOR 1W FORM":GOTO1390
1510 IF N2*W<=.525 GOTO1350
1520 IF N2*W>.650 THEN PRINT"COIL TOO LONG FOR 2W FORM":GOTO1390
1530 IF N2*W<=.650 GOTO1350
1540 PRINT"WOULD YOU LIKE TO SELECT THE LENGTH"
1550 INPUT"FOR A SPACE WOUND COIL (Y OR N)";Z$
1560 IF Z$="N" GOTO1450
1570 SL=(INT(N2*W*100))/100
1580 PRINT"THE LENGTH MUST BE GREATER THAN"; SL
1590 PRINT"INCHES, NEW LENGTH?"
1600 INPUT NL
1610 N2=INT((SQR((L*(4.5*D+10*NL)/((D/2)^2))))* 100+.5)/100
1620 FOR X=1 TO 14:PRINT"":NEXT
1630 PRINT"WIRE SIZE=";G;" GAGE"
1640 PRINT"COIL DIA.=";D;" INCHES"
1650 PRINT"NUMBER OF TURNS=";N2
1660 PRINT"COIL LENGTH=";NL;"INCHES"
1670 RETURN
1680 END
1690 PRINTTAB(3)"THIS IS A COIL DESIGN PROGRAM BY"
1700 PRINT
1710 PRINTTAB(8)"HARRY L. ROSIER K4LBF" :PRINT:FORI=1TO2000:NEXT
1720 PRINT"THE PROGRAM IS TO BE USED TO DESIGN "
1730 PRINT"SINGLE LAYER SOLENOIDS ON STANDARD"
1740 PRINT"RESISTOR FORMS OR ON A FORM HAVING A "
1750 PRINT"DIAMETER OF YOUR CHOOSING."
1760 PRINT
1770 PRINT"THE INDUCTANCE FORMULA IS FROM THE"
1780 PRINT"RADIO AMATEUR'S HANDBOOK."
1790 PRINT
1800 PRINT"THIS FORMULA IS TRANSPOSED TO DETERMINE"
1810 PRINT"THE NUMBER OF TURNS REQUIRED, AND THE "
1820 PRINT"RESULTING QUADRATIC IS SOLVED USING THE"
1830 PRINT"CLASSICAL EQUATION."
1840 PRINT
1850 PRINT"YOU DECIDE THE SIZE OF COIL FORM, THE"
1860 PRINT"INDUCANCE, OR INDUCTIVE REACTANCE, AND"
1870 PRINT"THE THE WIRE SIZE -"
1880 PRINT
1890 PRINT"**** THE COMPUTER WILL DO THE REST! ****"
1900 PRINT:PRINT" TO CONTINUE PRESS ANY KEY":PRINT:PRINT
1910 GETZ$:IFZ$=""THEN1910
1920 PRINT"IF THE COIL SIZE/WIRE SIZE COMBINATION"
1930 PRINT"WON'T FIT ON THE RESISTOR FORM CHOSEN"
1940 PRINT"THEN THE COMPUTER WILL TELL YOU SO AND"
1950 PRINT"ASK FOR ANOTHER CHOICE."
1960 PRINT
1970 PRINT"IF YOU CHOOSE THE COIL DIAMETER, THEN"
1980 PRINT"THE LENGTH CAN BE WHATEVER IS NECESSARY.":PRINT
1990 PRINT"THE COMPUTER WILL ALSO TELL YOU THE"
2000 PRINT"LENGTH TO DIAMETER RATIO AND ASK IF YOU"
2010 PRINT"WOULD LIKE THE NUMBER OF TURNS FOR A"
2020 PRINT"SPACE WOUND COIL OF SPECIFIED LENGTH."
2030 RETURN